package online.inote.dic.security.configure;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import online.inote.dic.security.core.TokenAuthenticationInterceptor;

/**
 * @description: 安全配置器
 * @author XQF.Sui
 * @created 2019年6月15日 下午1:29:15
 * @version 1.0
 */
@Configuration
public class SecurityWebMvcConfigurer implements WebMvcConfigurer {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new TokenAuthenticationInterceptor()).addPathPatterns("/**")
				.excludePathPatterns("/restful/**");
	}
}